package com.mew.chess.core.common.config;

import lombok.Data;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

public enum GiftConfig {
    YXX(1,new long[]{1,2,3}),
    LH(1,new long[]{1,2,3});

    private int roomId;
    private long[] giftGold;

    GiftConfig(int roomId,long[] giftGold){
        this.roomId = roomId;
        this.giftGold = giftGold;
    }

    public static long[] getById(int roomId){
        Map<Integer, long[]> map = Arrays.stream(values()).collect(Collectors.toMap(GiftConfig::roomId, GiftConfig::giftGold));
        return map.get(roomId);
    }

    public int roomId(){
        return roomId;
    }
    public long[] giftGold(){
        return giftGold;
    }
}
